<!DOCTYPE html>
<html>
<#include "/views/ftl/base/manager_include.ftl">
<script type="text/javascript" src="${basePath}js/My97DatePicker/WdatePicker.js"></script>
<base href="${basePath}">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>规格</title> 
</head>
<body style="background:#eef3f7;">
<#include "/views/ftl/base/head.ftl">
<div class="Main">
  <div class="dw">
<#include "/views/ftl/base/menu.ftl">
<#function a><#return "规格_List"></#function> 
<!--右边内容-->
<div class="Rightbox fl">
    <!--导航-->
    <div class="Bread_crbs clear">
      <div class="Bread_crbs_img fl"></div>
      <div class="Bread_crbs_text fl">
      	<a href="javascript:void(0);"><span>商品管理</span></a>
      	<span class="fnt_famy">></span>
      	<a href="javascript:void(0);"><span>规格</span></a>
      </div>
    </div>
      <div class="Table">
        </div>
  <!--表格列表-->
        <div class="Table"> 
          
          <div class="input_name">
             <span class="left_title">规格名称：</span>
             <input type="text" name="specificationName" class="search_text tdd50" style="width:210px" value="${(specification.name)!''}"> 
          </div>
          
          <div class="input_name" style="height: 350px; ">
             <span class="left_title">新增规格值：</span>
             <textarea name="specificationAllValue" style="    margin-left: 10px;     height: 300px;    width: 210px;resize: none;"  ></textarea>  
             <textarea  style="    margin-left: 10px;     height: 300px;    width: 210px;resize: none;" readonly="readonly">${(specificationValue)!''}</textarea>  
          </div>
          
          
          <span class="tbl_btn" style="margin-left: 300px;"> 
             <a href="javascript:void(0);"><span id="save" style="background: #0075c5;">保存</span></a>
          </span>
			</div>

          
        </div>
</div>  
<script> 
$(function(){
	
	$("#save").click(function(){
		
		var specificationName = $("input[name=specificationName]").val();  
		if(specificationName==''){
			alert("规格名称不能为空");
			return;
		}
		
		var specificationAllValue = $("textarea[name=specificationAllValue]").val();  
		 
		
		$.ajax({ 
			url : "${basePath}manager/Specification_modifyPlusSpecificationValue",
			data : { 
				specificationId:'${(specification.id)?c}',
				specificationAllValue:specificationAllValue,
				specificationName:specificationName
			}, 
			dataType :"JSON",
			cache : false,
			type : "POST",
			success : function(dat){
				if(dat.code==1){
					alert(dat.msg);
					window.location.reload();
				}else{
					alert(dat.msg);	
				} 
			}
		});
	});

});

</script>
</body>
</html>

